﻿<Window x:Class="DemoD3.RealtimeCurve.View"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0" 
        xmlns:local="clr-namespace:DemoD3.RealtimeCurve"
        Title="Demo Realtime Curve" Height="592.024" Width="856">
    <Window.Resources>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="5"/>
        </Style>
        <Style TargetType="ListBox">
            <Setter Property="Margin" Value="5"/>
        </Style>
        <local:CanCalculate2TxtConverter x:Key="converter"/>
    </Window.Resources>
    <DockPanel>
        <GroupBox Header="Control" DockPanel.Dock="Left" MinWidth="150">
            <DockPanel >
                <Button Content="Clear" DockPanel.Dock="Bottom"/>
                <Button DockPanel.Dock="Bottom" 
                        Content="{Binding Path=CanCalculate,Converter={StaticResource converter}}"
                        Command="{Binding Path=StartStopCalculateCmd}"/>
                <ListBox ItemsSource="{Binding Path=Curves}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding Path=IsVisible}" 
                                      Content="{Binding Path=Name}" 
                                      Foreground="{Binding Path=Color}" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </DockPanel>
        </GroupBox>

        <GroupBox Header="Curves">
            <d3:ChartPlotter Name="plotter"  Background="LemonChiffon" >
                <d3:ChartPlotter.HorizontalAxis>
                    <d3:HorizontalDateTimeAxis Name="dateAxis"/>
                </d3:ChartPlotter.HorizontalAxis>
                <d3:Header Content="Voltage Chart"/>

                <d3:VerticalAxisTitle Content="Voltage [V]"/>
                <d3:HorizontalAxisTitle Content="Time"/>

            </d3:ChartPlotter>
        </GroupBox>
    </DockPanel>
</Window>
